from django.db import models

from course.models import CourseModel
from user.models import UserModel
from utils.BaseModel import BaseModel


# Create your models here.
# 购物车的模型类
class CartModel(BaseModel):
    user = models.ForeignKey(UserModel, on_delete=models.CASCADE,verbose_name="用户id")
    course = models.ForeignKey(CourseModel, on_delete=models.CASCADE,verbose_name="课程id")
    selected = models.BooleanField(default=True,verbose_name="是否选中")
    class Meta:
        db_table = 'fgcart'

